<div class="container_12">

	<?php
		echo "lista de reservas feitas";
	?>

	<table cellpadding="0" cellspacing="0" border="0" class="display" id="reservationTable">
		<thead>
			<tr>
				<th width="30%">Nome da oferta</th>
				<th width="25%">Nome do cliente</th>
				<th>data da reserva</th>
			</tr>
		</thead>
		<tbody>
			<td colspan="5" class="dataTables_empty">Loading data from server</td>	
		</tbody>
	</table>
</div>

<script>
	ajaxUrl = "<?php echo $ajaxUrl;?>";

	$(document).ready(function() {
		
		var serverRequest = ajaxUrl + '/readReservationAction';

		var tableProperties = {		
			'sAjaxSource': 		serverRequest,	
			'sServerMethod':	'POST',
			'sAjaxDataProp': 	'data',
			"aoColumns": [
	  			{"mDataProp":"offerName"},
	  			{"mDataProp":"clientName"},
	  			{"mDataProp":"reservationDate"}
			  ],
			'bJQueryUI':		true,	// enable jqueryUI Themes
			'bPaginate':		true,
			'bSort':			true,
			'bInfo':			true,
			'bAutoWidth':		true,
			'bProcessing': 		true,
			'bServerSide': 		false	// use server side processing
		};
		
		$('#reservationTable').dataTable(tableProperties);
	});

</script>